Skip to content

Failing test for an api with two different methods but same route. - #1486

Closed
Marcus Bernander (marcusber) wants to merge 1 commit into
microsoft:vnextfrom
marcusber:mb/differentMethodSameRoute
Closed

Marcus Bernander (marcusber) wants to merge 1 commit into
microsoft:vnextfrom
marcusber:mb/differentMethodSameRoute

Conversation

@marcusber

Copy link
Copy Markdown

No description provided.

@baywet Vincent Biret (baywet) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Marcus Bernander (@marcusber)
Thanks for the contribution.
I left a comment on the sample you added.

"version": "1.0"
},
"paths": {
"/api/v2/someroute/areatype/{index}/{arg}": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this snippet is invalid according to the specification

The following paths are considered identical and invalid:
/pets/{petId}
/pets/{name}

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the response. Do I understand this correctly that it would be fine if language below would be renamed to arg and regenerated?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, but as you do so you'd then have to follow JSON conventions and merge the two nodes.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. I could also include the verb hard coded in the path to keep them seperated.

I guess you're just following the specification, but it makes no sense to me.
Decrease readability or clutter the path. A bit frustrating for something that did pass just fine and now is not, Server handled it well. Clients handled it well. The specification doesn't.

In the end it's just two different endpoints without a direct relation.

Anyways, thanks for your time Vincent Biret (@baywet) to shed some light over the behaviour.

@baywet

Copy link
Copy Markdown
Member

no worries, you can contribute to the specification if you think it needs to evolve :)
Closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants